﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Bes.Swsp.ToolBox
{
  /// <summary>
  /// A structure to use as a single key for a dictionary.
  /// </summary>
  /// <remarks>
  /// Warning: Must remain a struct -- if turned into a class, GetHashCode() and Equals() need to be overridden.
  /// Based on struct Tuple give in the top answer here:
  /// http://stackoverflow.com/questions/1171812/multi-key-dictionary-in-c
  /// </remarks>
  public struct CoordinateKey
  {
    public readonly double X;
    public readonly double Y;
    public CoordinateKey(double x, double y)
    {
      X = x;
      Y = y;
    }
  }
}
